const state = () => ({
  // table 表格展示 list 列表展示
  listViewType: uni.getStorageSync('app').listViewType || 'table'
})

const mutations = {
  LIST_SWITCH_VIEW(state) {
    if (state.listViewType === "list") {
      state.listViewType = "table"
    } else {
      state.listViewType = "list"
    }
    uni.setStorageSync('app', {
      listViewType: state.listViewType
    })
  }
}


export default {
  state,
  mutations
}